<ion-tabs #tabs>
    <ion-tab-bar slot="bottom" (ionTabBarChanged)="change($event)">
        <ion-tab-button [tab]="!isUrl? 'home': tab1Root">
            <img src="assets/imgs/tabs/home.svg" *ngIf="flag=='home'" class="img-icon" />
            <img src="assets/imgs/tabs/nohome.svg" *ngIf="flag!='home'" class="img-icon" />
            <ion-label [ngClass]="{ 'labelColor': flag == 'home' }">首页</ion-label>
        </ion-tab-button>

        <ion-tab-button [tab]="tab2Root">
            <img src="assets/imgs/tabs/alarm.svg" *ngIf="flag=='alarm'" class="img-icon" />
            <img src="assets/imgs/tabs/noalarm.svg" *ngIf="flag!='alarm'" class="img-icon" />
            <ion-label [ngClass]="{ 'labelColor': flag == 'alarm' }">告警</ion-label>
            <ion-badge [ngClass]="{ 'less': alarmAccount <= 100}" color="danger" *ngIf="alarmAccount">{{ alarmAccount }}</ion-badge>
        </ion-tab-button>

        <ion-tab-button [tab]="tab3Root">
            <img src="assets/imgs/tabs/mine.svg" *ngIf="flag=='my'" class="img-icon" />
            <img src="assets/imgs/tabs/nomine.svg" *ngIf="flag!='my'" class="img-icon" />
            <ion-label [ngClass]="{ 'labelColor': flag == 'my' }">我</ion-label>
        </ion-tab-button>
    </ion-tab-bar>
</ion-tabs>